<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>Fixed bottom</title>
		<link rel="stylesheet" href="../split-pane.css" />
		<!-- The style sheet below is not part of the split-pane plugin. Feel free to use it, or style things your own way. -->
		<link rel="stylesheet" href="../pretty-split-pane.css" />
		<script src="../bower_components/jquery/dist/jquery.min.js"></script>
		<script src="../split-pane.js"></script>
		<style type="text/css">

			html, body {
				height: 100%;
				min-height: 100%;
				margin: 0;
				padding: 0;
			}

			#top-component {
				bottom: 20em;
				margin-bottom: 5px;
				min-height: 5em;
			}

			#my-divider {
				bottom: 20em;
				height: 5px;
			}

			#bottom-component {
				height: 20em;
				min-height: 10em;
			}

		</style>

		<script>
			$(function() {
				$('div.split-pane').splitPane();
				$('button:first').on('click', function() {
					$('div.split-pane').splitPane('lastComponentSize', 300);
				});
				$('button:last').on('click', function() {
					$('div.split-pane').splitPane('firstComponentSize', 200);
				});
			});
		</script>

	</head>
	<body>
		<div class="pretty-split-pane-frame"><!-- This div is added for styling purposes only. It's not part of the split-pane plugin. -->
			<div class="split-pane fixed-bottom">
				<div class="split-pane-component" id="top-component">
					<div class="pretty-split-pane-component-inner"><!-- This div is added for styling purposes only. It's not part of the split-pane plugin. -->
						<p>This split pane component is dynamic: when re-sizing the browser window, the height will adjust.</p>
						<p><button>Set last component size to 300</button></p>
					</div>
				</div>
				<div class="split-pane-divider" id="my-divider"></div>
				<div class="split-pane-component" id="bottom-component">
					<div class="pretty-split-pane-component-inner"><!-- This div is added for styling purposes only. It's not part of the split-pane plugin. -->
						<p>
							This split pane component is fixed: when re-sizing the browser window, it will
							keep the same height.
						</p>
						<p>
							You can, however, re-size this component by dragging the divider, and it will adjust if
							the top component reaches it's <code>min-height</code> (<code>5em</code> in this example).
						</p>
						<p><button>Set first component size to 200</button></p>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
